package com.loubobooo.personal.blog.mapper.custom;

import com.loubobooo.personal.blog.entity.Comment;
import com.loubobooo.personal.blog.entity.vo.CommentVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapperCustom {

    //根据文章id获取评论列表
    public List<CommentVO> listCommentByArticleId(@Param(value = "status") Integer status,
            @Param(value = "id") Integer id);

    //获得评论列表分页
    public List<CommentVO> listCommentByPage(@Param(value = "status") Integer status,
            @Param(value = "startPos") Integer startPos, @Param(value = "pageSize") Integer pageSize);

    //获得评论列表
    public List<CommentVO> listComment(@Param(value = "status") Integer status);

    //统计评论数
    public Integer countComment(@Param(value = "status") Integer status);

    //获得最近评论
    public List<CommentVO> listRecentComment(@Param(value = "limit") Integer limit);

    //获得评论的子评论
    public List<Comment> listChildComment(@Param(value = "id") Integer id);

}
